package com.example.foobar.business.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.foobar.business.service.ImsAccountWechatsService;
import com.example.foobar.dao.service.ImsAccountWechatsDaoService;
import com.example.foobar.entity.ImsAccountWechats;
import com.example.foobar.mapper.ImsAccountWechatsMapper;
import com.example.foobar.param.ImsAccountWechatsPageParam;
import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 *  服务实现类
 *
 * @author 郑英奔
 * @since 2021-05-31
 */
@Slf4j
@Service
public class ImsAccountWechatsServiceImpl implements ImsAccountWechatsService {

    @Autowired
    private ImsAccountWechatsDaoService imsAccountWechatsDaoService;

    public boolean saveImsAccountWechats(ImsAccountWechats imsAccountWechats) throws Exception {
        return imsAccountWechatsDaoService.save(imsAccountWechats);
    }

    public boolean updateImsAccountWechats(ImsAccountWechats imsAccountWechats) throws Exception {
        return imsAccountWechatsDaoService.updateById(imsAccountWechats);
    }

    public boolean deleteImsAccountWechats(Long id) throws Exception {
        return imsAccountWechatsDaoService.removeById(id);
    }

    public Paging<ImsAccountWechats> getImsAccountWechatsPageList(ImsAccountWechatsPageParam imsAccountWechatsPageParam) throws Exception {
        return imsAccountWechatsDaoService.getImsAccountWechatsPageList(imsAccountWechatsPageParam);
    }


    public List<ImsAccountWechats> selectList(LambdaQueryWrapper<ImsAccountWechats> eq) {
        return imsAccountWechatsDaoService.selectList(eq);
    }

    @Override
    public ImsAccountWechats getById(Long id) {
        return imsAccountWechatsDaoService.getById(id);
    }

}
